﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="${site.theme_dir}css/Answer.css" rel="stylesheet"
          type="text/css" />
    <link href="${site.theme_dir}css/init.css" rel="stylesheet" type="text/css" />
    <link href="${site.theme_dir}css/head.css" rel="stylesheet" type="text/css">
    
    <title>我要提问</title>
    <script type="text/javascript" src="${site.dir}Scripts/jquery_min.js"> </script>
</head>
<body>
    <div id="page">
        #parse("shared/_incs/_header.html")
        <div class="content">
            <a href="Integral.html">
                <img src="${site.theme_dir}images/AllComments/banner.gif" width="950"
                     height="80">
            </a>
            <div class="left">
                <div class="Merchandise">
                    <a href="${url.index}product-details-${product.ID}.aspx" class="a_01">
                        <img src="${product.ProductBigPic}" width="150" height="205" />
                    </a><a href="${url.index}product-details-${product.ID}.aspx"
                           class="gray">${product.ProductName}</a><br />
                    <a class="gray_no">市场价：￥${product.ProductMarketPrice}</a><span class="red">团购价：￥${product.ProductMemberPrice}</span>
                    <input type="button" name="button" id="button" value="" class="button01" />
                    <input type="button" name="button2" id="button2" value="" class="button02" />
                </div>
                <ul class="ul04">
                    <h2>
                        我浏览过的管理
                    </h2>
                    <mm:getUserBrowseProductList ID="getUserBrowseProductList" runat="server" />
                    <div class="clear">
                    </div>
                </ul>
            </div>
            <form id="form1" runat="server">
                <div class="right">
                    <div class="right_top">
                        <strong class="name">问题：${ m_ask.AskTitle}</strong>
                    </div>
                    <div class="clear">
                    </div>
                    <div class="ask">
                        <h2>
                            ${m_user.GetModel(Input.SetInt(m_ask.MemberID)).UserName}
                            提问：${m_ask.AskTitle%>
                        </h2>
                        <span>
                            ${m_ask.AskContent%>
                        </span> <span>
                            <a href="${url.index}product-allask.aspx?productid=${ m_ask.ProductID}">查看全部问答</a>
                            <div class="clear">
                            </div>
                    </div>
                    <div class="Administrator">
                        <asp:Repeater ID="rpList" runat="server">
                            <ItemTemplate>
                                <h2>
                                    <%#b_user.GetModel(Input.SetInt(DataBinder.Eval(Container.DataItem,"memberid"))).UserName}回答：
                                </h2>
                                <span><%#DataBinder.Eval(Container.DataItem, "AnswerContent")%></span>
                            </ItemTemplate>
                        </asp:Repeater>
                    </div>
                    <div class="pager">
                        <webdiyer:AspNetPager ID="Pager" runat="server" AlwaysShow="True" CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页，每页%PageSize%条"
                                              FirstPageText="首页" HorizontalAlign="Right" LastPageText="尾页" NextPageText="下一页"
                                              OnPageChanged="Pager_PageChanged" PageIndexBoxType="DropDownList" PageSize="10"
                                              PrevPageText="上一页" ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText="Go"
                                              TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到">
                        </webdiyer:AspNetPager>
                    </div>
                    <table width="700" border="0" cellspacing="0" cellpadding="0" class="table01">
                        <tr>
                            <td width="109" align="right">
                                我来回答：
                            </td>
                            <td width="611" align="right">
                                <asp:TextBox ID="txtanswerContent" runat="server" CssClass="textarea01" TextMode="MultiLine"></asp:TextBox>
                                <span id="addTextWord">提示：做多发布500个字。</span>
                            </td>
                        </tr>
                    </table>
                    <asp:Button ID="btnSave" runat="server" Text="" CssClass="button04" />
                    <asp:HiddenField ID="hfproductid" runat="server" Value="0" />
                    <asp:HiddenField ID="hfaskid" runat="server" Value="0" />
                </div>
            </form>
        </div>
        #parse("shared/_incs/_dismode.html")
        #parse("shared/_incs/_footer.html")
    </div>

    <script type="text/javascript">
        $(function() {
            $("#btnSave").click(function() {
                return check_answer_form();
            });
            $("#txtanswerContent").keyup(function() {
            var s = $("#txtanswerContent").val();
            var nowlength = s.length;
            if ((500 - nowlength) < 0) {
                s = s.substring(0, 500);
                $("#txtanswerContent").val(s)
                return;
            }
            $("#addTextWord").html("已输入" + nowlength + "字，还可以输入" + (500 - nowlength) + "字");
            });
        });
        function check_answer_form() {
            if ($("#txtanswerContent").val() == "") {
                alert("回答内容不能为空!");
                return false;
            }
            return true;
        }
    </script>
</body>
</html>